<!--
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/business/stagingarea/StagingArea.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/business/stagingarea/StagingArea.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '暂存区',
                name: 'stagingarea/StagingArea',
                url: "/StagingArea/",
                sortName: "CreateDate",
                foreignKey:"StagingAreaId"
            });
            const editFormFields = ref({"RegionName":"","RegionNo":"","HeatNo":"","LocationDescription":"","Enable":""});
            const editFormOptions = ref([[{"title":"区域名称","field":"RegionName"},
                               {"title":"区域编号","field":"RegionNo"},
                               {"title":"指定炉号","field":"HeatNo"}],
                              [{"title":"位置描述","field":"LocationDescription","type":"textarea"},
                               {"title":"是否启用","field":"Enable","type":"switch"}]]);
            const searchFormFields = ref({"RegionName":"","RegionNo":""});
            const searchFormOptions = ref([[{"title":"区域名称","field":"RegionName"},{"title":"区域编号","field":"RegionNo"}]]);
            const columns = ref([{field:'Id',title:'主键',type:'string',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'RegionName',title:'区域名称',type:'string',link:true,width:110,align:'left',sort:true},
                       {field:'RegionNo',title:'区域编号',type:'string',width:110,align:'left'},
                       {field:'HeatNo',title:'指定炉号',type:'string',width:110,align:'left'},
                       {field:'LocationDescription',title:'位置描述',type:'string',width:110,align:'left'},
                       {field:'Enable',title:'是否启用',type:'int',width:110,align:'left'},
                       {field:'CreateUserName',title:'添加人',type:'string',width:110,align:'left'},
                       {field:'CreateUserId',title:'添加人ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateDate',title:'添加时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyUserName',title:'修改人',type:'string',width:110,align:'left'},
                       {field:'ModifyUserId',title:'修改人ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'DeletionFlag',title:'删除标识',type:'int',width:110,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "工位位置表",
                table: "StagingLocation",
                columns: [{field:'Id',title:'主键',type:'string',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'StagingAreaId',title:'区位ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'TheRow',title:'第几排',type:'int',width:80,edit:{type:''},align:'left',sort:true},
                       {field:'TheColumn',title:'第几个',type:'int',width:80,edit:{type:''},align:'left'},
                       {field:'SLName',title:'区位编号',type:'string',link:true,width:110,edit:{type:''},align:'left'},
                       {field:'Sort',title:'排序号',type:'int',width:80,edit:{type:''},align:'left'},
                       {field:'IsOccupy',title:'是否占用',type:'int',width:80,edit:{type:'switch'},align:'left'},
                       {field:'MaterialBoxNo',title:'当前料箱号',type:'string',width:110,edit:{type:''},align:'left'},
                       {field:'RFIDNo',title:'当前料箱RFID号',type:'string',width:110,edit:{type:''},align:'left'},
                       {field:'UpdateTime',title:'更新时间',type:'datetime',width:150,edit:{type:'datetime'},align:'left',sort:true},
                       {field:'LocationDescription',title:'更新描述',type:'string',width:110,edit:{type:''},align:'left'},
                       {field:'Enable',title:'是否启用',type:'int',width:80,edit:{type:'switch'},align:'left'},
                       {field:'CreateUserName',title:'添加人',type:'string',width:80,align:'left'},
                       {field:'CreateUserId',title:'添加人ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateDate',title:'添加时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyUserName',title:'修改人',type:'string',width:80,align:'left'},
                       {field:'ModifyUserId',title:'修改人ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'DeletionFlag',title:'删除标识',type:'int',width:110,hidden:true,align:'left'}],
                sortName: "Sort",
                key: "Id"
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
